# This file is part of BlackArch Linux ( https://www.blackarch.org/ ).
# See COPYING for license details.

pkgname=python-pika
_pkgname=pika
pkgver=1.3.2
pkgrel=4
pkgdesc='Pika Python AMQP Client Library.'
arch=('any')
url='https://pypi.org/project/pika/#files'
license=('BSD')
depends=('python')
makedepends=('python-pip' 'python-build' 'python-wheel')
source=("https://files.pythonhosted.org/packages/source/${_pkgname::1}/$_pkgname/$_pkgname-$pkgver.tar.gz")
sha512sums=('802eae5a3c11d2b5ec6f921809c2c68d7438a0b3ceda2619ea9f328737564aa017bc57f4304415d7f0febd4a3bfb64dde723871462a33c713e91b60476165f85')

build() {
  cd "$_pkgname-$pkgver"

  python -m build --wheel --outdir="$startdir/dist"
}

package() {
  cd "$_pkgname-$pkgver"

  pip install \
    --verbose \
    --disable-pip-version-check \
    --no-warn-script-location \
    --ignore-installed \
    --no-compile \
    --no-deps \
    --root="$pkgdir" \
    --prefix=/usr \
    --no-index \
    --find-links="file://$startdir/dist" \
    $_pkgname
}

